package cn.wolfcode.car.business.mapper;

import cn.wolfcode.car.business.domain.Statement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface StatementMapper extends BaseMapper<Statement> {
    int deleteByPrimaryKey(Long id);

    int insert(Statement record);

    Statement selectByPrimaryKey(Long id);

    List<Statement> selectAll();

    int updateByPrimaryKey(Statement record);

    Statement selectByAppointmentId(Long appointmentId);

    Statement selectByStatementId(Long statementId);

    void updateAmount(@Param("statementId") Long statementId, @Param("totalAmount") BigDecimal totalAmount, @Param("totalQuantity") BigDecimal totalQuantity, @Param("itemPrice") BigDecimal itemPrice);

    void changeStatus(@Param("statementId") Long statementId, @Param("status") Integer status,@Param("userId") Long userId);
}